3.65 \(\int \frac{1}{\left (a+\frac{c}{x^2}+\frac{b}{x}\right ) x (d+e x)} \, dx\)

Optimal. Leaf size=124 \[ \frac{(b d-2 c e) \tanh ^{-1}\left (\frac{2 a x+b}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (a d^2-e (b d-c e)\right )}+\frac{d \log \left (a x^2+b x+c\right )}{2 \left (a d^2-e (b d-c e)\right )}-\frac{d \log (d+e x)}{a d^2-e (b d-c e)} \]

[Out]

((b*d - 2*c*e)*ArcTanh[(b + 2*a*x)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(a*d^2
 - e*(b*d - c*e))) - (d*Log[d + e*x])/(a*d^2 - e*(b*d - c*e)) + (d*Log[c + b*x +
 a*x^2])/(2*(a*d^2 - e*(b*d - c*e)))

_______________________________________________________________________________________

Rubi [A]  time = 0.323081, antiderivative size = 124, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24 \[ \frac{(b d-2 c e) \tanh ^{-1}\left (\frac{2 a x+b}{\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c} \left (a d^2-e (b d-c e)\right )}+\frac{d \log \left (a x^2+b x+c\right )}{2 \left (a d^2-e (b d-c e)\right )}-\frac{d \log (d+e x)}{a d^2-e (b d-c e)} \]

Antiderivative was successfully verified.

[In]  Int[1/((a + c/x^2 + b/x)*x*(d + e*x)),x]

[Out]

((b*d - 2*c*e)*ArcTanh[(b + 2*a*x)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*(a*d^2
 - e*(b*d - c*e))) - (d*Log[d + e*x])/(a*d^2 - e*(b*d - c*e)) + (d*Log[c + b*x +
 a*x^2])/(2*(a*d^2 - e*(b*d - c*e)))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 62.2532, size = 112, normalized size = 0.9 \[ - \frac{d \log{\left (\frac{d}{x} + e \right )}}{a d^{2} - b d e + c e^{2}} + \frac{d \log{\left (a + \frac{b}{x} + \frac{c}{x^{2}} \right )}}{2 \left (a d^{2} - b d e + c e^{2}\right )} - \frac{\left (b d - 2 c e\right ) \operatorname{atanh}{\left (\frac{b + \frac{2 c}{x}}{\sqrt{- 4 a c + b^{2}}} \right )}}{\sqrt{- 4 a c + b^{2}} \left (a d^{2} - b d e + c e^{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a+c/x**2+b/x)/x/(e*x+d),x)

[Out]

-d*log(d/x + e)/(a*d**2 - b*d*e + c*e**2) + d*log(a + b/x + c/x**2)/(2*(a*d**2 -
 b*d*e + c*e**2)) - (b*d - 2*c*e)*atanh((b + 2*c/x)/sqrt(-4*a*c + b**2))/(sqrt(-
4*a*c + b**2)*(a*d**2 - b*d*e + c*e**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.128955, size = 107, normalized size = 0.86 \[ \frac{d \sqrt{4 a c-b^2} (2 \log (d+e x)-\log (x (a x+b)+c))+2 (b d-2 c e) \tan ^{-1}\left (\frac{2 a x+b}{\sqrt{4 a c-b^2}}\right )}{2 \sqrt{4 a c-b^2} \left (e (b d-c e)-a d^2\right )} \]

Antiderivative was successfully verified.

[In]  Integrate[1/((a + c/x^2 + b/x)*x*(d + e*x)),x]

[Out]

(2*(b*d - 2*c*e)*ArcTan[(b + 2*a*x)/Sqrt[-b^2 + 4*a*c]] + Sqrt[-b^2 + 4*a*c]*d*(
2*Log[d + e*x] - Log[c + x*(b + a*x)]))/(2*Sqrt[-b^2 + 4*a*c]*(-(a*d^2) + e*(b*d
 - c*e)))

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 169, normalized size = 1.4 \[ -{\frac{d\ln \left ( ex+d \right ) }{a{d}^{2}-bde+{e}^{2}c}}+{\frac{d\ln \left ( a{x}^{2}+bx+c \right ) }{2\,a{d}^{2}-2\,bde+2\,{e}^{2}c}}-{\frac{bd}{a{d}^{2}-bde+{e}^{2}c}\arctan \left ({(2\,ax+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+2\,{\frac{ce}{ \left ( a{d}^{2}-bde+{e}^{2}c \right ) \sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,ax+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a+c/x^2+b/x)/x/(e*x+d),x)

[Out]

-d/(a*d^2-b*d*e+c*e^2)*ln(e*x+d)+1/2/(a*d^2-b*d*e+c*e^2)*d*ln(a*x^2+b*x+c)-1/(a*
d^2-b*d*e+c*e^2)/(4*a*c-b^2)^(1/2)*arctan((2*a*x+b)/(4*a*c-b^2)^(1/2))*b*d+2/(a*
d^2-b*d*e+c*e^2)/(4*a*c-b^2)^(1/2)*arctan((2*a*x+b)/(4*a*c-b^2)^(1/2))*c*e

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((e*x + d)*(a + b/x + c/x^2)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.527888, size = 1, normalized size = 0.01 \[ \left [-\frac{{\left (b d - 2 \, c e\right )} \log \left (-\frac{b^{3} - 4 \, a b c + 2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} x -{\left (2 \, a^{2} x^{2} + 2 \, a b x + b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{a x^{2} + b x + c}\right ) - \sqrt{b^{2} - 4 \, a c}{\left (d \log \left (a x^{2} + b x + c\right ) - 2 \, d \log \left (e x + d\right )\right )}}{2 \,{\left (a d^{2} - b d e + c e^{2}\right )} \sqrt{b^{2} - 4 \, a c}}, -\frac{2 \,{\left (b d - 2 \, c e\right )} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, a x + b\right )}}{b^{2} - 4 \, a c}\right ) - \sqrt{-b^{2} + 4 \, a c}{\left (d \log \left (a x^{2} + b x + c\right ) - 2 \, d \log \left (e x + d\right )\right )}}{2 \,{\left (a d^{2} - b d e + c e^{2}\right )} \sqrt{-b^{2} + 4 \, a c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((e*x + d)*(a + b/x + c/x^2)*x),x, algorithm="fricas")

[Out]

[-1/2*((b*d - 2*c*e)*log(-(b^3 - 4*a*b*c + 2*(a*b^2 - 4*a^2*c)*x - (2*a^2*x^2 +
2*a*b*x + b^2 - 2*a*c)*sqrt(b^2 - 4*a*c))/(a*x^2 + b*x + c)) - sqrt(b^2 - 4*a*c)
*(d*log(a*x^2 + b*x + c) - 2*d*log(e*x + d)))/((a*d^2 - b*d*e + c*e^2)*sqrt(b^2
- 4*a*c)), -1/2*(2*(b*d - 2*c*e)*arctan(-sqrt(-b^2 + 4*a*c)*(2*a*x + b)/(b^2 - 4
*a*c)) - sqrt(-b^2 + 4*a*c)*(d*log(a*x^2 + b*x + c) - 2*d*log(e*x + d)))/((a*d^2
 - b*d*e + c*e^2)*sqrt(-b^2 + 4*a*c))]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a+c/x**2+b/x)/x/(e*x+d),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.298772, size = 171, normalized size = 1.38 \[ -\frac{d e{\rm ln}\left ({\left | x e + d \right |}\right )}{a d^{2} e - b d e^{2} + c e^{3}} + \frac{d{\rm ln}\left (a x^{2} + b x + c\right )}{2 \,{\left (a d^{2} - b d e + c e^{2}\right )}} - \frac{{\left (b d - 2 \, c e\right )} \arctan \left (\frac{2 \, a x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (a d^{2} - b d e + c e^{2}\right )} \sqrt{-b^{2} + 4 \, a c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((e*x + d)*(a + b/x + c/x^2)*x),x, algorithm="giac")

[Out]

-d*e*ln(abs(x*e + d))/(a*d^2*e - b*d*e^2 + c*e^3) + 1/2*d*ln(a*x^2 + b*x + c)/(a
*d^2 - b*d*e + c*e^2) - (b*d - 2*c*e)*arctan((2*a*x + b)/sqrt(-b^2 + 4*a*c))/((a
*d^2 - b*d*e + c*e^2)*sqrt(-b^2 + 4*a*c))